package com.juno.cafenoa;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.juno.cafenoa.R;

/**
 * 상단에 나타낼 뷰를 정의한 class.
 * @author JUNHO
 */
public class TopNavigatorView extends LinearLayout {
	Context mContext;
	TextView title;
		
	//뷰초기화
	public TopNavigatorView(Context context) {
		super(context);
		this.mContext = context;
	}

	public TopNavigatorView(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.mContext = context;
		
	}
	
	//String을 받아와서 해당자리에 이름을 바꿈.
	public void init(String naviName){
		LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		inflater.inflate(R.layout.top_navigator, this);
		title = (TextView) findViewById(R.id.top_navi_name);
		title.setText(naviName);
	}

}
